package com.estore.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.estore.entity.FavoriteProduct;

public class FavoriteProductMapper implements RowMapper<FavoriteProduct> {

	@Override
	public FavoriteProduct mapRow(ResultSet rs, int arg1) throws SQLException {
		FavoriteProduct product = new FavoriteProduct();
		product.setProductID(rs.getInt("productid"));
		product.setUserID(rs.getInt("userid"));
		product.setAddDate(rs.getString("adddate"));
		product.setType(rs.getInt("type"));
		return product;
	}

}
